onStateChanged

abstract fun onStateChanged(blocks: List<DesignBlock>): Flow<List<DesignBlock>>

Subscribe to changes to the state of a block. Like getState, the state of a block is determined by the state of itself and its Shape, Fill and Effect block(s).

Return

flow of block state change events.

Parameters

blocks

a list of blocks to filter events by. If the list is empty, events for every block are sent.